﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2"
                   assembly="ProgressTracker.Data"
                   namespace="ProgressTracker.Data.Entities">
  <class name="User" table="Users">
    <id name="Id" column="Id" type="int" generator="identity"/>
    <property name="Email" column="Email" type="string"/>
    <property name="PasswordHash" column="PasswordHash" type="string"/>
    <property name="MustChangePassword" column="MustChangePassword" type="bool"/>
    <bag name="Days"
         inverse="true">
      <key column="UserId" />
      <one-to-many class="Day"/>
    </bag>
    <bag name="Tasks"
         inverse="true">
      <key column="UserId" />
      <one-to-many class="Task"/>
    </bag>
  </class>

</hibernate-mapping>
